// device.h

// Copyright (C) 2010  traxex

// Author: 	traxex <traxex@yahoo.cn>
// Created: 	29 Jul 2010
// Version: 	1.0

#pragma once

#include <stdio.h>	//using printf

namespace traxex{
namespace cuda{
void Device::print(){
    printf( "-----------------%s-----------------\n"
            "total global memory                %.2fG bytes\n"
            "shared memroy per block            %zu bytes\n"
            "registers per block                %d\n"
            "warp size                          %d\n"
            "memory pitch                       %zu\n"
            "max threads per block              %d\n"
            "max threads dim                    [%d,%d,%d]\n"
            "max grids size                     [%d,%d,%d]\n"
            "total const memory                 %zubytes\n"
            "version number                     %d.%d\n"
            "clock rate                         %.2f GHz\n"
            "texture alignment                  %zu\n"
            "device overlap                     %d\n"
            "multi processor count              %d\n"
            "kernel exec timeout enabled        %d\n"
            "integrated                         %d\n"
            "can map host memory                %d\n"
            "compute mode                       %d\n"
            "concurrent kernels                 %d\n",
            this->name,
            (float)(this->totalGlobalMem)/(1<<30),
            this->sharedMemPerBlock,
            this->regsPerBlock,
            this->warpSize,
            this->memPitch,
            this->maxThreadsPerBlock,
            this->maxThreadsDim[0],this->maxThreadsDim[1],this->maxThreadsDim[2],
            this->maxGridSize[0],this->maxGridSize[1],this->maxGridSize[2],
            this->totalConstMem,
            this->major,
            this->minor,
            (float)(this->clockRate)/(1<<20),
            this->textureAlignment,
            this->deviceOverlap,
            this->multiProcessorCount,
            this->kernelExecTimeoutEnabled,
            this->integrated,
            this->canMapHostMemory,
            this->computeMode,
            this->concurrentKernels
            );
}
}
}
